//
// Created by ziya on 2021/1/14.
//

#ifndef STACK_ENGINE_STACKFRAME_H
#define STACK_ENGINE_STACKFRAME_H

#include "common.h"
#include "operandStack.h"
#include "localVariableTable.h"

class StackFrame {

private:
    jint _localVariableTableSize;   // 暂时没用上
    jint _operandStackSize;         // 暂时没用上

private:
    LocalVariableTable* _localVariableTable;
    OperandStack* _operandStack;

public:
    StackFrame() {

    }

    StackFrame(jint tableSize, jint stackSize) {
        _localVariableTableSize = tableSize;
        _operandStackSize = stackSize;

        _operandStack = new OperandStack;
        _localVariableTable = new LocalVariableTable;
    }

public:
    LocalVariableTable* localVariableTable();
    OperandStack* operandStack();

};


#endif //STACK_ENGINE_STACKFRAME_H
